package com.example.myapplication1014;

import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.service.autofill.RegexValidator;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
    Button zhuce;
    Button denglu;
    EditText zhanghao ;
    EditText mima;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();//实例化控件
        //处理事件
        event();
    }
    private void event() {
        zhuce.setOnClickListener(new View.OnClickListener() {
            //吐丝
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this,"注册",Toast.LENGTH_LONG).show();
               Intent intent=new Intent(MainActivity.this,zhuce.class);
               //跳转startActivity(intent);
                startActivityForResult(intent,1);
            }
       });
        denglu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this,"登陆",Toast.LENGTH_LONG).show();
            }
        });
    }
    public void initView(){
        zhuce = findViewById(R.id.zhuce);
        denglu=findViewById(R.id.denglu);
        zhanghao = findViewById(R.id.zhanghao);
        mima=findViewById(R.id.mima);

    }
    //消亡
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        String name=
    }

}
